1. Field of the Invention
The invention relates to communication control method and system for connecting equipment such as initiator (host computer) and target (printer or the like).
2. Related Background Art
In recent years, the IEEE1394 interface is being used to connect a computer and peripheral equipment or connect both peripheral equipment. The IEEE1394 interface has a processing speed higher than that of the hand shaking system such as a centronics interface or the like and can perform a bidirectional communication. The IEEE1394 interface is also an interface for a memory bus model and equipment connected by it can read or write data at a designated address from/to partner's equipment.
According to IEEE1394, although a protocol for a physical layer and a link layer to apply it in a wide range is determined, a detailed protocol for each equipment is not decided. Therefore, a protocol for a transport layer such as SBP (Serial Bus Protocol)-2 or the like using IEEE1394 has been proposed as physical/link layers. The transport layer is a layer which provides a data transfer function for an application. The applications using such a layer can mutually exchange data.
The SBP-2 protocol is a protocol utilizing a feature as a memory bus model of IEEE1394, and the reception side of data can receive the data in accordance with circumstances of itself. On the other hand, as protocols other than SBP-2, there are a protocol which can transfer data which is asynchronously generated and a protocol which can realize multichannels. However, such protocols cannot utilize the feature as a memory bus model of IEEE1394. That is, in case of a communication between a host and a printer, data transfer cannot be performed in accordance with circumstances on the printer side and the host has to perform the data transfer while monitoring a status of the printer.
According to SBP-2, in case of transferring data, an operation called “login” is first performed on the transmission side, thereby establishing a channel with a communication partner. In this instance, the login side is called an initiator and the partner side connected to the initiator is called a target. The data transfer is performed by reading or writing data from/into a buffer of the initiator from the target in accordance with an instruction from the initiator. In such a system, the initiator forms an ORB (Operation Request Block) in which an address, a size, and the like of the buffer in which the data to be transmitted has been stored have been written and notifies the target of the address of the ORB. The target reads out or writes the data from/to the initiator on the basis of the address and size written in the ORB in accordance with its own circumstances, forms a status block after completion of those processes, and notifies the initiator of states of the processes.
In case of performing a communication by using the SBP-2 protocol established on IEEE1394, particularly, in the case where a data source such as a host computer or the like is used as an initiator and it is applied to a data transfer from the initiator to peripheral equipment such as a printer apparatus or the like as a target, there are the four following problems.
(Problem 1) A procedure is complicated because of a full duplex communication.
In SBP-2, the data transfer is fundamentally managed by the initiator and the target cannot perform the asynchronous data transfer to the initiator. That is, in SBP-2, when the target wants to transfer data to the initiator, it sends a data reading request to the initiator in an unsolicited status. The initiator forms an ORB in response to it and includes the formed ORB into the end of a list of the pending ORBs (a data transfer request from the initiator to the target and the like are included). Since the ORBs are processed in order from the head, the data is transferred from the target to the initiator for the first time when the process of the ORB on the initiator side is progressed and the ORB processes in response to the data reading request from the target instead of a timing when the target issues the reading request to the initiator. That is, in the case where the bidirectional asynchronous data transfer cannot be performed and the data to be transferred from the target to the initiator is asynchronously generated, for example, assuming that the target is a printer, in the case where an error occurs in the printer, or the like, the data to be transferred immediately to the initiator cannot be momentarily transmitted.
Therefore, for example, to immediately send data which is asynchronously generated from the printer to the host, a login procedure has to be performed by using the printer as an initiator and a data transfer in which the host computer is used as a target has to be performed.
In a situation such that the host computer and the printer mutually login and each of them is the initiator or the target as mentioned above, a process as an initiator and a process as a target have to be provided for both the host computer and the printer. The operation of login has to be also performed by the printer. In a peripheral apparatus such as a printer for handling an image, a large amount of memory resources or processor resources are consumed for image processes. Therefore, costs have to be shaved by simplifying a construction of the apparatuses or resources which are used for applications other than the image processing application have to be saved as much as possible in order to perform the processes promptly. However, as mentioned above, the more often the processes are executed, the larger amount of resources are consumed. This is contrary to the purpose of shaving costs and realization of a high efficiency of processes.
As for the relation between the host computer and the printer, data flowing in each direction is correlated as a relation between print data and a processing situation of it. However, if a channel is set by an independent login with respect to each direction, those data and response have to be mutually concerned and it is necessary to newly add a processing procedure for such a purpose.
As mentioned above, it is not proper to apply IEEE1394 and SBP-2 to the communication between the host computer and the printer apparatus as they are. It is difficult to reduce the resources necessary for each apparatus and improve the efficiency.
(Problem 2) Multichannels cannot be realized.
In recent years, a hybrid apparatus in which various functions are combined as peripheral apparatuses is being used. For example, there is a digital hybrid apparatus or the like such that a facsimile apparatus is used as a scanner unit apparatus, a printer unit apparatus, and a facsimile and can be used from the host computer or the like. When such a hybrid apparatus is used, if a communication is performed through a plurality of independent channels every unit apparatus function, a plurality of functions can be simultaneously used.
In SBP-2, however, since the multichannels cannot be provided, it is difficult to simultaneously use such unit apparatus functions.
(Problem 3) It is impossible to cope with a bus reset.
In IEEE1394, a bus reset occurs when a status change which becomes a cause of a change of a network construction such that new equipment is connected to a 1394 serial bus or the equipment is disconnected or a power source of the connected equipment is turned on or off occurs. The bus reset occurs when a node which detects the status change as mentioned above on the bus transmits a bus resetting signal onto the bus. The generated bus resetting signal is transmitted from one node to another. When all nodes on the network receive the bus resetting signal, a series of operations for the bus reset is performed in each node.
As mentioned above, the bus reset occurs asynchronously with the process in a node on a network. Even in case of a node which is not concerned with a node which becomes a cause of the bus reset with respect to the application, if the bus reset has once occurred, a bus resetting process has to be performed. In the bus resetting step, in the node which performs a communication by SBP-2, the set connection is disconnected. Even if it is re-connected, a guarantee such that the process can be continued from the state just before the bus reset is not given.
Since the initiator transmits commands to the target so as not to exceed the number of commands in each queue, there is a case where commands assured in the queues which are not used are in vain.